package com.yj.ccs.abs.common.enums;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/20
 * Author     : Unbelievable9
 **/
public enum ContractTransportType {

    /**
     * 0 - 未知
     * 1 - 汽运
     * 2 - 火运
     * 3 - 船运
     */
    UNKNOWN(0),
    MOTOR(1),
    TRAIN(2),
    SHIP(3);

    private Integer value;

    ContractTransportType(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static ContractTransportType fromValue(Integer value) {
        for (ContractTransportType contractTransportType : ContractTransportType.values()) {
            if (contractTransportType.getValue().equals(value)) {
                return contractTransportType;
            }
        }

        return null;
    }
}
